package top.yokey.shopnc.model;

import top.yokey.shopnc.base.BaseConstant;
import top.yokey.base.base.BaseHttpClient;
import top.yokey.base.base.BaseHttpListener;

@SuppressWarnings("ALL")
public class MemberFundModel {

    private final String ACT = "member_fund";
    private static volatile MemberFundModel instance;

    public static MemberFundModel get() {
        if (instance == null) {
            synchronized (MemberFundModel.class) {
                if (instance == null) {
                    instance = new MemberFundModel();
                }
            }
        }
        return instance;
    }

    public void preDepositLog(String page, BaseHttpListener baseHttpListener) {

        BaseHttpClient.get().ready(ACT, "predepositlog")
                .add("page", BaseConstant.PAGE)
                .add("curpage", page)
                .get(baseHttpListener);

    }

    public void pdRechargeList(String page, BaseHttpListener baseHttpListener) {

        BaseHttpClient.get().ready(ACT, "pdrechargelist")
                .add("page", BaseConstant.PAGE)
                .add("curpage", page)
                .get(baseHttpListener);

    }

    public void pdCashList(String page, BaseHttpListener baseHttpListener) {

        BaseHttpClient.get().ready(ACT, "pdcashlist")
                .add("page", BaseConstant.PAGE)
                .add("curpage", page)
                .get(baseHttpListener);

    }

    public void rcbLog(String page, BaseHttpListener baseHttpListener) {

        BaseHttpClient.get().ready(ACT, "rcblog")
                .add("page", BaseConstant.PAGE)
                .add("curpage", page)
                .get(baseHttpListener);

    }

    public void rechargeCardAdd(String rcSn, String captcha, String codeKey, BaseHttpListener baseHttpListener) {

        BaseHttpClient.get().ready(ACT, "rechargecard_add")
                .add("rc_sn", rcSn)
                .add("captcha", captcha)
                .add("codekey", codeKey)
                .post(baseHttpListener);

    }

}
